<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var arr = [1, 2, 4, 6, 7, 8, 10, 15, 17, 20]
			var i = 0, j = arr.length - 1
			for (; i < j;) {
				if (arr[i] + arr[j] < 19) {
					i++
				} else if (arr[i] + arr[j] > 19) {
					j--
				} else {
					console.log(`${arr[i]}+${arr[j]}=${arr[i] + arr[j]}`)
					i++
					j--
				}
			}
		</script>
	</body>
</html>
